home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / glibmm-2.4 / proc / m4 / convert_gtk.m4 < prev    next >
M4 Source File  |  2006-04-20  |  19KB  |  395 lines

  1. dnl $Id: convert_gtk.m4,v 1.2 2003/05/02 16:07:24 murrayc Exp $
  2.  
  3. include(convert_glib.m4)
  4.  
  5. #
  6. # Table of widgets
  7. #
  8.  
  9. _EQUAL(gboolean,int)
  10. _EQUAL(gint,int)
  11. _EQUAL(gint*,int*)
  12. _EQUAL(gint&,int&)
  13. _EQUAL(guint,unsigned int)
  14. _EQUAL(guint*,unsigned int*)
  15. _EQUAL(guint&,unsigned int&)
  16. _EQUAL(gdouble,double)
  17. _EQUAL(gdouble*,double*)
  18. _EQUAL(gfloat, float)
  19. _EQUAL(float*,gfloat[])
  20.  
  21. _EQUAL(GdkAtom,Gdk::Atom)
  22. _EQUAL(const-char*,const-gchar*)
  23. _EQUAL(return-char*,return-gchar*)
  24. _EQUAL(gpointer,void*)
  25. _EQUAL(gconstpointer,const void*)
  26. #
  27. # Basic Types
  28. _CONVERSION(`int',`bool',`$3')
  29. _CONVERSION(`bool',`int',`static_cast<int>($3)')
  30. _CONVERSION(`unsigned int',`bool',`$3')
  31. _CONVERSION(`bool',`unsigned int',`static_cast<unsigned int>($3)')
  32. _CONVERSION(`int&',`gint*',`&($3)')
  33. _CONVERSION(`gint*',`int&',`*($3)')
  34. _CONVERSION(`guint&',`guint*',`&($3)')
  35. _CONVERSION(`double&',`gdouble*',`&($3)')
  36. _CONVERSION(`float&',`gfloat*',`&($3)')
  37. _CONVERSION(`gchar**',`char**',`$3')
  38. _CONVERSION(`char**',`gchar**',`$3')
  39. _CONVERSION(`gpointer&',`gpointer*',`&($3)')
  40. _CONVERSION(`void*&',`gpointer*',`&($3)')
  41.  
  42. _CONVERSION(`GError*&',`GError**',`&($3)')
  43.  
  44.  
  45.  
  46. # Enums:
  47. _CONV_ENUM(Gtk,AccelFlags)
  48. _CONV_ENUM(Gtk,ArrowType)
  49. _CONV_ENUM(Gtk,AttachOptions)
  50. _CONV_ENUM(Gtk,ButtonBoxStyle)
  51. _CONV_ENUM(Gtk,ButtonsType)
  52. _CONV_ENUM(Gtk,CalendarDisplayOptions)
  53. _CONV_ENUM(Gtk,CellRendererMode)
  54. _CONV_ENUM(Gtk,CellRendererState)
  55. _CONV_ENUM(Gtk,CornerType)
  56. _CONV_ENUM(Gtk,CurveType)
  57. _CONV_ENUM(Gtk,DeleteType)
  58. _CONV_ENUM(Gtk,DestDefaults)
  59. _CONV_ENUM(Gtk,DirectionType)
  60. _CONV_ENUM(Gtk,ExpanderStyle)
  61. _CONV_ENUM(Gtk,ImageType)
  62. _CONV_ENUM(Gtk,Justification)
  63. _CONV_ENUM(Gtk,MenuDirectionType)
  64. _CONV_ENUM(Gtk,MessageType)
  65. _CONV_ENUM(Gtk,MetricType)
  66. _CONV_ENUM(Gtk,MovementStep)
  67. _CONV_ENUM(Gtk,NotebookTab)
  68. _CONV_ENUM(Gtk,Orientation)
  69. _CONV_ENUM(Gtk,PackType)
  70. _CONV_ENUM(Gtk,PolicyType)
  71. _CONV_ENUM(Gtk,PositionType)
  72. _CONV_ENUM(Gtk,PreviewType)
  73. _CONV_ENUM(Gtk,ProgressBarOrientation)
  74. _CONV_ENUM(Gtk,ProgressBarStyle)
  75. _CONV_ENUM(Gtk,ReliefStyle)
  76. _CONV_ENUM(Gtk,ResizeMode)
  77. _CONV_ENUM(Gtk,ScrollType)
  78. _CONV_ENUM(Gtk,SelectionMode)
  79. _CONV_ENUM(Gtk,ShadowType)
  80. _CONV_ENUM(Gtk,SizeGroupMode)
  81. _CONV_ENUM(Gtk,SortType)
  82. _CONV_ENUM(Gtk,SpinButtonUpdatePolicy)
  83. _CONV_ENUM(Gtk,SpinType)
  84. _CONV_ENUM(Gtk,StateType)
  85. _CONV_ENUM(Gtk,TextDirection)
  86. _CONV_ENUM(Gtk,TextSearchFlags)
  87. _CONV_ENUM(Gtk,TextWindowType)
  88. _CONV_ENUM(Gtk,ToolbarChildType)
  89. _CONV_ENUM(Gtk,ToolbarStyle)
  90. _CONV_ENUM(Gtk,TreeModelFlags)
  91. _CONV_ENUM(Gtk,TreeViewColumnSizing)
  92. _CONV_ENUM(Gtk,TreeViewDropPosition)
  93. _CONV_ENUM(Gtk,UpdateType)
  94. _CONV_ENUM(Gtk,Visibility)
  95. _CONV_ENUM(Gtk,WidgetHelpType)
  96. _CONV_ENUM(Gtk,WindowPosition)
  97. _CONV_ENUM(Gtk,WindowType)
  98. _CONV_ENUM(Gtk,WrapMode)
  99.  
  100. _CONVERSION(`GtkIconSize',`IconSize',`IconSize(static_cast<int>($3))')
  101. _CONVERSION(`GtkIconSize',`Gtk::IconSize',`Gtk::IconSize(static_cast<int>($3))')
  102. _CONVERSION(`IconSize',`GtkIconSize',`static_cast<GtkIconSize>(int($3))')
  103. _CONVERSION(`Gtk::IconSize',`GtkIconSize',`static_cast<GtkIconSize>(int($3))')
  104. include(convert_atk.m4)
  105. include(convert_pango.m4)
  106. include(convert_gdk.m4)
  107.  
  108. _CONVERSION(`guint',`WindowType',`static_cast<WindowType>($3)')
  109. _CONVERSION(`PolicyType&',`GtkPolicyType*',`(($2) &($3))')
  110. _CONVERSION(`SortType&',`GtkSortType*',`(($2) &($3))')
  111. _CONVERSION(`SortType*',`GtkSortType*',`(($2) ($3))')
  112. _CONVERSION(`GtkSortType*',`SortType*',`(($2) ($3))')
  113. _CONVERSION(`guint8',`Gtk::StateType',`static_cast<StateType>($3)')
  114.  
  115.  
  116.  
  117. # StockID:
  118. _CONVERSION(`const Gtk::StockID&',`const char*',`($3).get_c_str()')
  119. _CONVERSION(`char*',`StockID',`StockID($3)') # the StockID ctor handles 0
  120.  
  121. #
  122. # Ptr (gtk+) -> Ptr (gtkmm)
  123. define(`__FP2P',`($`'2)Glib::unwrap($`'3)')
  124. define(`__RP2P',`Glib::wrap($`'3)')
  125. define(`__RP2PD',`Glib::wrap((tran`'slit($`'2,:,))($`'3))')
  126. define(`__RP2CPD',`Glib::wrap((tran`'slit(pat`'subst($`'2,^const ,),:,))($`'3))')
  127.  
  128. _CONVERSION(`GtkAdjustment*',`Gtk::Adjustment*',__RP2P)
  129. _CONVERSION(`GtkAdjustment*',`Adjustment*',__RP2P)
  130. _CONVERSION(`GtkWidget*',`Gtk::Widget*',__RP2P)
  131. _CONVERSION(`GtkWidget*',`Widget*',__RP2P)
  132. _CONVERSION(`GtkWindow*',`Window*',__RP2P)
  133. _CONVERSION(`GtkMenu*',`Menu*',__RP2P)
  134.  
  135. # Ptr (gtk+) -> const Ptr (gtkmm)
  136. _CONVERSION(`GtkAdjustment*',`const Gtk::Adjustment*',__RP2P)
  137. _CONVERSION(`GtkAdjustment*',`const Adjustment*',__RP2P)
  138. _CONVERSION(`GtkWidget*',`const Gtk::Widget*',__RP2P)
  139. _CONVERSION(`GtkWidget*',`const Widget*',__RP2P)
  140. _CONVERSION(`GtkWindow*',`const Window*',__RP2P)
  141.  
  142. # Style:
  143. _CONVERSION(`GtkStyle*',`Glib::RefPtr<Style>',`Glib::wrap($3)')
  144. _CONVERSION(`GtkStyle*',`Glib::RefPtr<const Style>',`Glib::wrap($3)')
  145. _CONVERSION(`const Glib::RefPtr<Style>&',`GtkStyle*',__CONVERT_REFPTR_TO_P)
  146. _CONVERSION(`Glib::RefPtr<Style>',`GtkStyle*',__CONVERT_REFPTR_TO_P)
  147. _CONVERSION(`GtkRcStyle*',`Glib::RefPtr<RcStyle>',`Glib::wrap($3)')
  148. _CONVERSION(`GtkRcStyle*',`Glib::RefPtr<const RcStyle>',`Glib::wrap($3)')
  149. _CONVERSION(`const Glib::RefPtr<RcStyle>&',`GtkRcStyle*',__CONVERT_REFPTR_TO_P)
  150. _CONVERSION(`Glib::RefPtr<RcStyle>',`GtkRcStyle*',__CONVERT_REFPTR_TO_P)
  151. _CONVERSION(`GtkRcStyle*',`const Glib::RefPtr<RcStyle>&',`Glib::wrap($3)')
  152.  
  153. # AccelGroup:
  154. _CONVERSION(`GtkAccelGroup*',`Glib::RefPtr<AccelGroup>',`Glib::wrap($3)')
  155. _CONVERSION(`GtkAccelGroup*',`Glib::RefPtr<const AccelGroup>',`Glib::wrap($3)')
  156. _CONVERSION(`const Glib::RefPtr<AccelGroup>&',`GtkAccelGroup*',__CONVERT_REFPTR_TO_P)
  157. _CONVERSION(`Gtk::Object&',`GObject*', `($3).Glib::Object::gobj()')
  158.  
  159. #
  160. # Ptr (Gtkmm) -> Ptr (gtk+)
  161. _CONVERSION(`Gtk::Adjustment*',`GtkAdjustment*',__FP2P)
  162. _CONVERSION(`Adjustment*',`GtkAdjustment*',__FP2P)
  163. _CONVERSION(`Gtk::Widget*',`GtkWidget*',__FP2P)
  164. _CONVERSION(`Widget*',`GtkWidget*',__FP2P)
  165. _CONVERSION(`Menu*',`GtkMenu*',__FP2P)
  166.  
  167. #
  168. # Ptr (gtk+) -> Ptr (gtkmm) (downcast)
  169. _CONVERSION(`GtkWidget*',`Button*',`Glib::wrap((GtkButton*)($3))')
  170. _CONVERSION(`GtkWidget*',`Box*',`Glib::wrap((GtkBox*)($3))')
  171. _CONVERSION(`GtkWidget*',`HBox*',`Glib::wrap((GtkHBox*)($3))')
  172. _CONVERSION(`GtkWidget*',`VBox*',`Glib::wrap((GtkVBox*)($3))')
  173. _CONVERSION(`GtkWidget*',`ColorSelection*',`Glib::wrap((GtkColorSelection*)($3))')
  174. _CONVERSION(`GtkWidget*',`Gtk::CheckButton*',__RP2PD)
  175. _CONVERSION(`GtkWidget*',`Entry*',`Glib::wrap((GtkEntry*)($3))')
  176. _CONVERSION(`GtkWidget*',`FontSelection*',`Glib::wrap((GtkFontSelection*)($3))')
  177. _CONVERSION(`GtkWidget*',`Label*',`Glib::wrap((GtkLabel*)($3))')
  178. _CONVERSION(`GtkWidget*',`Menu*',`Glib::wrap((GtkMenu*)($3))')
  179. _CONVERSION(`GtkWidget*',`MenuItem*',`Glib::wrap((GtkMenuItem*)($3))')
  180. _CONVERSION(`GtkWidget*',`OptionMenu*',`Glib::wrap((GtkOptionMenu*)($3))')
  181. _CONVERSION(`GtkWidget*',`RadioButton*',`Glib::wrap((GtkRadioButton*)($3))')
  182. _CONVERSION(`GtkWidget*',`Gtk::Scrollbar*',__RP2PD)
  183. _CONVERSION(`GtkWidget*',`Gtk::HScrollbar*',__RP2PD)
  184. _CONVERSION(`GtkWidget*',`Gtk::VScrollbar*',__RP2PD)
  185. _CONVERSION(`GtkWidget*',`Table*',`Glib::wrap((GtkTable*)($3))')
  186. _CONVERSION(`GtkWidget*',`Gtk::Tree*',__RP2PD)
  187. _CONVERSION(`GtkWidget*',`ScrolledWindow*',`Glib::wrap((GtkScrolledWindow*)($3))')
  188. _CONVERSION(`GtkWidget*',`Window*',`Glib::wrap((GtkWindow*)($3))')
  189. _CONVERSION(`GtkWidget*',`TreeView*',`Glib::wrap((GtkTreeView*)($3))')
  190. _CONVERSION(`GtkWidget*',`HButtonBox*',`Glib::wrap((GtkHButtonBox*)($3))')
  191. _CONVERSION(`GtkWidget*',`ComboDropDown*',`Glib::wrap((GtkList*)($3))')
  192.  
  193. # Ptr (gtk+) -> const Ptr (gtkmm) (downcast)
  194. _CONVERSION(`GtkWidget*',`const Button*',`Glib::wrap((GtkButton*)($3))')
  195. _CONVERSION(`GtkWidget*',`const Box*',`Glib::wrap((GtkBox*)($3))')
  196. _CONVERSION(`GtkWidget*',`const HBox*',`Glib::wrap((GtkHBox*)($3))')
  197. _CONVERSION(`GtkWidget*',`const VBox*',`Glib::wrap((GtkVBox*)($3))')
  198. _CONVERSION(`GtkWidget*',`const ColorSelection*',`Glib::wrap((GtkColorSelection*)($3))')
  199. _CONVERSION(`GtkWidget*',`const Gtk::CheckButton*',__RP2CPD)
  200. _CONVERSION(`GtkWidget*',`const Entry*',`Glib::wrap((GtkEntry*)($3))')
  201. _CONVERSION(`GtkWidget*',`const FontSelection*',`Glib::wrap((GtkFontSelection*)($3))')
  202. _CONVERSION(`GtkWidget*',`const Label*',`Glib::wrap((GtkLabel*)($3))')
  203. _CONVERSION(`GtkWidget*',`const Menu*',`Glib::wrap((GtkMenu*)($3))')
  204. _CONVERSION(`GtkWidget*',`const MenuItem*',`Glib::wrap((GtkMenuItem*)($3))')
  205. _CONVERSION(`GtkWidget*',`const OptionMenu*',`Glib::wrap((GtkOptionMenu*)($3))')
  206. _CONVERSION(`GtkWidget*',`const RadioButton*',`Glib::wrap((GtkRadioButton*)($3))')
  207. _CONVERSION(`GtkWidget*',`const Gtk::Scrollbar*',__RP2CPD)
  208. _CONVERSION(`GtkWidget*',`const Gtk::HScrollbar*',__RP2CPD)
  209. _CONVERSION(`GtkWidget*',`const Gtk::VScrollbar*',__RP2CPD)
  210. _CONVERSION(`GtkWidget*',`const Table*',`Glib::wrap((GtkTable*)($3))')
  211. _CONVERSION(`GtkWidget*',`const Gtk::Tree*',__RP2CPD)
  212. _CONVERSION(`GtkWidget*',`const ScrolledWindow*',`Glib::wrap((GtkScrolledWindow*)($3))')
  213. _CONVERSION(`GtkWidget*',`const Window*',`Glib::wrap((GtkWindow*)($3))')
  214. _CONVERSION(`GtkWidget*',`const TreeView*',`Glib::wrap((GtkTreeView*)($3))')
  215. _CONVERSION(`GtkWidget*',`const HButtonBox*',`Glib::wrap((GtkHButtonBox*)($3))')
  216. _CONVERSION(`GtkWidget*',`const ComboDropDown*',`Glib::wrap((GtkList*)($3))')
  217.  
  218. # Ptr (gtk+) -> Ref (Gtkmm)
  219. _CONVERSION(`GtkWidget*', `Widget&', `*Glib::wrap($3)')
  220.  
  221. # Ref (Gtkmm) -> GtkWidget* Ptr (gtk+)
  222. define(`__FR2PD',`($`'3).Gtk::Widget::gobj()')
  223. _CONVERSION(`MenuShell&',`GtkWidget*',__FR2PD)
  224. _CONVERSION(`MenuItem&',`GtkWidget*',__FR2PD)
  225. _CONVERSION(`Menu&',`GtkWidget*',__FR2PD)
  226. _CONVERSION(`Gtk::TreeItem&',`GtkWidget*',__FR2PD)
  227.  
  228. # Ref (Gtkmm) -> Ptr (gtk+)
  229. define(`__FR2P',`($`'3).gobj()')
  230. define(`__FCR2P',`const_cast<$`'2>(($`'3).gobj())')
  231. _CONVERSION(`Gtk::Adjustment&',`GtkAdjustment*',__FR2P)
  232. _CONVERSION(`Adjustment&',`GtkAdjustment*',__FR2P)
  233. _CONVERSION(`Gtk::Style&',`GtkStyle*',__FR2P)
  234. _CONVERSION(`Gtk::Widget&',`GtkWidget*',__FR2P)
  235. _CONVERSION(`Widget&',`GtkWidget*',__FR2P)
  236. _CONVERSION(`Window&',`GtkWindow*',__FR2P)
  237. _CONVERSION(`CellRenderer&',`GtkCellRenderer*',__FR2P)
  238.  
  239. # Glib::ListHandle<> (gtkmm) -> GList (gtk+)
  240. _CONVERSION(`const Glib::ListHandle<Glib::ustring>&',`GList*',`$3.data()')
  241. _CONVERSION(`const Glib::ListHandle<Widget*>&',`GList*',`$3.data()')
  242. _CONVERSION(`const Glib::ListHandle<const Widget*>&',`GList*',`$3.data()')
  243. _CONVERSION(`const Glib::ListHandle<Window*>&',`GList*',`$3.data()')
  244.  
  245. # GList (gtk+) -> Glib::ListHandle<> (gtkmm)
  246. define(`__FL2H_SHALLOW',`$`'2($`'3, Glib::OWNERSHIP_SHALLOW)')
  247. _CONVERSION(`GList*',`Glib::ListHandle<Widget*>',__FL2H_SHALLOW)
  248. _CONVERSION(`GList*',`Glib::ListHandle<const Widget*>',__FL2H_SHALLOW)
  249. _CONVERSION(`GList*',`Glib::ListHandle<Window*>',__FL2H_SHALLOW)
  250. _CONVERSION(`GList*',`Glib::ListHandle<TreeViewColumn*>',__FL2H_SHALLOW)
  251. _CONVERSION(`GList*',`Glib::ListHandle<const TreeViewColumn*>',__FL2H_SHALLOW)
  252. _CONVERSION(`GList*',`Glib::ListHandle<CellRenderer*>',__FL2H_SHALLOW)
  253. _CONVERSION(`GList*',`Glib::ListHandle<const CellRenderer*>',__FL2H_SHALLOW)
  254. _CONVERSION(`GList*',`Glib::ListHandle<TreeModel::Row>',__FL2H_SHALLOW)
  255. _CONVERSION(`GList*',`Glib::ListHandle<const TreeModel::Row>',__FL2H_SHALLOW)
  256. _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<Tag> >',__FL2H_SHALLOW)
  257. _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<TextTag> >',__FL2H_SHALLOW)
  258. _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<TextMark> >',__FL2H_SHALLOW)
  259. _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<TextBuffer::Mark> >',__FL2H_SHALLOW)
  260.  
  261.  
  262. _CONVERSION(`const Widget&',`GtkWidget*',__FCR2P)
  263.  
  264. _CONVERSION(`int&',`int*',`&$3',`*$3')
  265.  
  266. dnl
  267. dnl # These are for fixmegtkconst
  268. _CONVERSION(`gdouble*',`const gdouble*',`const_cast<const gdouble*>($3)',`$3')
  269. _CONVERSION(`const double*',`gdouble*',`const_cast<gdouble*>($3)',`$3')
  270. _CONVERSION(`const guchar*',`guchar*',`const_cast<guchar*>($3)',`$3')
  271.  
  272. #_CONVERSION(`GSList*',`const Group&',`Group($3)')
  273. _CONVERSION(`GSList*',`Group',`Group($3)')
  274. _CONVERSION(`Group&',`GSList*',`$3.group_')
  275. _CONVERSION(`Group',`GSList*',`$3.group_')
  276.  
  277. _CONVERSION(`Gtk::Item&',`GtkItem*',__FR2P)
  278. _CONVERSION(Gtk::Notebook_Helpers::Page*,GtkNotebookPage*,`($1)((void*)($3))',`($2)((void*)($3))')
  279.  
  280. _CONVERSION(`GtkSettings*',`Glib::RefPtr<Settings>', Glib::wrap($3))
  281.  
  282. _CONVERSION(`IconSet&',`GtkIconSet*',__FR2P)
  283. _CONVERSION(`const IconSet&',`GtkIconSet*',`const_cast<GtkIconSet*>(($3).gobj())')
  284. _CONVERSION(`GtkIconSet*',`IconSet',`Glib::wrap($3)')
  285. _CONVERSION(`IconSource&',`GtkIconSource*',__FR2P)
  286. _CONVERSION(`const IconSource&',`const GtkIconSource*',__FR2P)
  287. _CONVERSION(`const GtkIconSource*',`const IconSource&',`Glib::wrap(const_cast<GtkIconSource*>($3), true)')
  288.  
  289. # gpointer conversions:
  290. # There's doesn't seem to be a way to tell g_signal_new that it's a pointer to a gint, for instance:
  291. #_CONVERSION(`int*',`gpointer',`($1)$3')
  292. #_CONVERSION(`gpointer',`int*',`($1)$3')
  293.  
  294.  
  295. # Text:
  296. _CONVERSION(`GtkTextTagTable*',`Glib::RefPtr<TextTagTable>',`Glib::wrap($3)')
  297. _CONVERSION(`GtkTextTagTable*',`Glib::RefPtr<TagTable>',`Glib::wrap($3)')
  298. _CONVERSION(`GtkTextTagTable*',`Glib::RefPtr<TextBuffer::TagTable>',`Glib::wrap($3)')
  299. _CONVERSION(`GtkTextTagTable*',`Glib::RefPtr<const TextBuffer::TagTable>',`Glib::wrap($3)')
  300. _CONVERSION(`GtkTextMark*',`Glib::RefPtr<Mark>',`Glib::wrap($3)')
  301. _CONVERSION(`GtkTextMark*',`Glib::RefPtr<TextBuffer::Mark>',`Glib::wrap($3)')
  302. _CONVERSION(`GtkTextMark*',`Glib::RefPtr<const TextBuffer::Mark>',`Glib::wrap($3)')
  303. _CONVERSION(`const Glib::RefPtr<Mark>&',`GtkTextMark*',__CONVERT_REFPTR_TO_P)
  304. _CONVERSION(`const Glib::RefPtr<TextBuffer::Mark>&',`GtkTextMark*',__CONVERT_REFPTR_TO_P)
  305. _CONVERSION(`GtkTextTag*',`Glib::RefPtr<TextTag>',`Glib::wrap($3)')
  306. _CONVERSION(`GtkTextTag*',`Glib::RefPtr<const TextTag>',`Glib::wrap($3)')
  307. _CONVERSION(`const Glib::RefPtr<TextTag>&',`GtkTextTag*',__CONVERT_REFPTR_TO_P)
  308. _CONVERSION(`const Glib::RefPtr<Tag>&',`GtkTextTag*',__CONVERT_REFPTR_TO_P)
  309. _CONVERSION(`const Glib::RefPtr<TextBuffer::Tag>&',`GtkTextTag*',__CONVERT_REFPTR_TO_P)
  310. _CONVERSION(`GtkTextBuffer*',`Glib::RefPtr<TextBuffer>',`Glib::wrap($3)')
  311. _CONVERSION(`GtkTextBuffer*',`Glib::RefPtr<const TextBuffer>',`Glib::wrap($3)')
  312. _CONVERSION(`TextIter&',`GtkTextIter*',__FR2P)
  313. _CONVERSION(`TextBuffer::iterator&',`GtkTextIter*',__FR2P)
  314. _CONVERSION(`iterator&',`GtkTextIter*',__FR2P)
  315. _CONVERSION(`const TextIter&',`const GtkTextIter*',__FR2P)
  316. _CONVERSION(`const TextBuffer::iterator&',`const GtkTextIter*',__FR2P)
  317. _CONVERSION(`const iterator&',`const GtkTextIter*',__FR2P)
  318. _CONVERSION(`TextAttributes&',`GtkTextAttributes*',__FR2P)
  319. _CONVERSION(`GtkTextAttributes*',`TextAttributes',TextAttributes($3))
  320. _CONVERSION(`const Glib::RefPtr<TextTagTable>&',`GtkTextTagTable*',__CONVERT_REFPTR_TO_P)
  321. _CONVERSION(`const Glib::RefPtr<TextBuffer>&',`GtkTextBuffer*',__CONVERT_REFPTR_TO_P)
  322. _CONVERSION(`const Glib::RefPtr<TextChildAnchor>&',`GtkTextChildAnchor*',__CONVERT_REFPTR_TO_P)
  323. _CONVERSION(`GtkTextChildAnchor*',`Glib::RefPtr<TextChildAnchor>',`Glib::wrap($3)')
  324.  
  325. # Tree:
  326. _CONVERSION(`const TreeIter&',`const GtkTreeIter*',__FR2P)
  327. _CONVERSION(`const iterator&',`const GtkTreeIter*',__FR2P)
  328. _CONVERSION(`const TreeIter&',`GtkTreeIter*',__FCR2P)
  329. _CONVERSION(`const iterator&',`GtkTreeIter*',__FCR2P)
  330. _CONVERSION(`const TreeModel::Row&',`GtkTreeIter*',__FCR2P)
  331. _CONVERSION(`iterator&',`GtkTreeIter*',__FR2P)
  332. _CONVERSION(`const TreeModel::iterator&',`GtkTreeIter*',__FCR2P)
  333. _CONVERSION(`TreeViewColumn&',`GtkTreeViewColumn*',__FR2P)
  334. _CONVERSION(`GtkTreeViewColumn*',`TreeViewColumn*',`Glib::wrap($3)')
  335. _CONVERSION(`GtkTreeViewColumn*',`const TreeViewColumn*',`Glib::wrap($3)')
  336. _CONVERSION(`TreePath&',`GtkTreePath*',__FR2P)
  337. _CONVERSION(`const TreePath&',`const GtkTreePath*',__FR2P)
  338. _CONVERSION(`const TreePath&',`GtkTreePath*',__FCR2P)
  339. _CONVERSION(`const Path&',`GtkTreePath*',__FCR2P)
  340. _CONVERSION(`const TreeModel::Path&',`GtkTreePath*',__FCR2P)
  341. _CONVERSION(`GtkTreeView*',`TreeView*',`Glib::wrap($3)')
  342. _CONVERSION(`GtkTreeView*',`const TreeView*',`Glib::wrap($3)')
  343. _CONVERSION(`GtkTreeModel*',`Glib::RefPtr<TreeModel>',`Glib::wrap($3)')
  344. _CONVERSION(`GtkTreeModel*',`Glib::RefPtr<const TreeModel>',`Glib::wrap($3)')
  345. _CONVERSION(`const Glib::RefPtr<TreeModel>&',`GtkTreeModel*',__CONVERT_REFPTR_TO_P)
  346. _CONVERSION(`GtkTreeSelection*',`Glib::RefPtr<TreeSelection>',`Glib::wrap($3)')
  347. _CONVERSION(`GtkTreeSelection*',`Glib::RefPtr<const TreeSelection>',`Glib::wrap($3)')
  348. _CONVERSION(`const TreeModelColumnBase&',`int',`($3).index`'()')
  349. _CONVERSION(`GtkTreePath*',`TreePath', `Gtk::TreePath($3, false)')
  350. _CONVERSION(`GtkTreePath*',`Path', `Gtk::TreePath($3, false)')
  351. _CONVERSION(`GtkTreePath*',`TreeModel::Path', `Gtk::TreePath($3, false)')
  352. _CONVERSION(`GtkIconSet*&',`GtkIconSet**',`&($3)')
  353. _CONVERSION(`GtkIconSize&',`GtkIconSize*',`&($3)')
  354. _CONVERSION(`GtkCellEditable*',`CellEditable*',`dynamic_cast<$2>(Glib::wrap_auto((GObject*)($3), false))')
  355. _CONVERSION(`CellEditable*',`GtkCellEditable*',`Glib::unwrap($3)')
  356.  
  357.  
  358.  
  359. #_CONVERSION(`Clipboard&',`GtkClipboard*',`($3).gobj()')
  360. _CONVERSION(`GtkClipboard*',`Glib::RefPtr<Clipboard>',`Glib::wrap($3)')
  361. _CONVERSION(`GtkClipboard*',`Glib::RefPtr<const Clipboard>',`Glib::wrap($3)')
  362. _CONVERSION(`const Glib::RefPtr<Clipboard>&',`GtkClipboard*',__CONVERT_REFPTR_TO_P($3))
  363. #_CONVERSION(`GtkClipboard*',`Gtk::Clipboard&',`Glib::wrap($3, true)')
  364.  
  365. _CONVERSION(`SelectionData',`GtkSelectionData*', `($3).gobj()')
  366. _CONVERSION(`const SelectionData&',`GtkSelectionData*', __FCR2P)
  367. _CONVERSION(`SelectionData&',`GtkSelectionData*', __FR2P)
  368. #_CONVERSION(`GtkSelectionData*',`SelectionData', `Gtk::SelectionData(($3), true)')
  369.  
  370.  
  371. # Used by Signals:
  372. _CONVERSION(`GtkTextIter*',`const TextIter&',Glib::wrap($3))
  373. _CONVERSION(`GtkTextIter*',`const TextBuffer::iterator&',Glib::wrap($3))
  374. _CONVERSION(`const GtkTextIter*',`const TextIter&',Glib::wrap($3))
  375. _CONVERSION(`const GtkTextIter*',`const TextBuffer::iterator&',Glib::wrap($3))
  376. _CONVERSION(`const TextIter&',`GtkTextIter*',__FCR2P)
  377. _CONVERSION(`const TextBuffer::iterator&',`GtkTextIter*',__FCR2P)
  378. _CONVERSION(`GtkTextChildAnchor*',`const Glib::RefPtr<TextChildAnchor>&',`Glib::wrap($3, true)')
  379. _CONVERSION(`GtkTextMark*',`const Glib::RefPtr<Mark>&',`Glib::wrap($3, true)')
  380. _CONVERSION(`GtkTextMark*',`const Glib::RefPtr<TextBuffer::Mark>&',`Glib::wrap($3, true)')
  381. _CONVERSION(`GtkTextTag*',`const Glib::RefPtr<TextTag>&',`Glib::wrap($3, true)')
  382. _CONVERSION(`GtkTextTag*',`const Glib::RefPtr<TextBuffer::Tag>&',`Glib::wrap($3, true)')
  383. _CONVERSION(`GObject*',`const Glib::RefPtr<Glib::Object>&',`Glib::wrap($3, true)')
  384. _CONVERSION(`GtkTreePath*',`const TreeModel::Path&',`Gtk::TreePath($3, true)')
  385. _CONVERSION(`GtkTreePath*',`const Path&',`Gtk::TreePath($3, true)')
  386. _CONVERSION(`TreeViewColumn*',`GtkTreeViewColumn*',__FP2P)
  387. _CONVERSION(`GtkStyle*',`const Glib::RefPtr<Style>&',`Glib::wrap($3, true)')
  388.  
  389.  
  390.  
  391. _CONVERSION(`AlignmentEnum',`float',`_gtkmm_align_float_from_enum($3)')
  392.  
  393.  
  394.  
  395.